<template>
    <div class="film-item">
        <!-- <img class="img" src="@/film/assets/imgs/film.jpg" alt="" srcset="">
        <div class="name">大黄蜂</div>
        <div class="stars" >
            <i class="iconfont icon-collection-b active" v-for="c in 5" :key="c"></i>
            <span class="source">10.0</span>
        </div> -->
        <!-- <div class="stars" v-else>
            <i class="iconfont icon-collection-b" v-for="c in 5" :class="{ active: Math.ceil(film.source) >= c }"></i>
            <span class="source">{{ (film.source * 2).toFixed(1) }}</span>
        </div> -->
        <img class="img" :src="film.filmImg" alt="" srcset="">
        <div class="name">{{ film.filmName }}</div>
        <div class="stars" v-if="film.source == null">
            <span class="source">暂无评分</span>
        </div>
        <div class="stars" v-else>
            <i class="iconfont icon-collection-b" v-for="c in 5" :key="c"
                :class="{ active: Math.ceil(film.source) >= c }"></i>
            <span class="source">{{ (film.source * 2).toFixed(1) }}</span>
        </div>
    </div>


</template>
<script>

export default {
    props: {
       film:{
            type: Object,
            default() {

            }
       }
    },
    data() {
        return {

        }
    }
}
</script>